home *** CD-ROM | disk | FTP | other *** search
/ CD BIT 75 / CD BIT 75.iso / Software / ooo / f_0020 / sbasic.jar / text / sbasic / common / 03132300.xml < prev    next >
Encoding:
Extensible Markup Language  |  2003-08-01  |  4.3 KB  |  34 lines

  1. <?xml version="1.0" encoding="utf-8"?>
  2. <html><head><title>CreateUnoValue Function [Runtime]</title><meta name="filename" content="text/sbasic/common/03132300"/><help:css-file-link xmlns:help="http://openoffice.org/2000/help"/><!--The CSS style header method for setting styles--><style type="text/css">
  3.  
  4.         table.Tabelle3{
  5.                 }
  6.         span.Tabelle3A{
  7.                 width:1.499cm;}
  8.         span.Tabelle3B{
  9.                 width:16.499cm;}
  10.         p.P1{
  11.                 }
  12.         span.fr1{
  13.                 }
  14.         </style></head><body>
  15.   
  16.   
  17.   <help:paragraphinfo state="E" xmlns:help="http://openoffice.org/2000/help"/><help:to-be-embedded Eid="createunovalue" xmlns:help="http://openoffice.org/2000/help">
  18.   <p class="Head1"><help:paragraphinfo state="U" number="1"/><help:key-word value="CreateUnoValue; function" tag="kw68684_1"/><help:link Id="68684">CreateUnoValue Function [Runtime]</help:link></p>
  19.   <p class="Paragraph"><help:paragraphinfo state="U" number="2"/>Returns an object that represents a strictly typed value referring to the Uno type system. </p>
  20.   <help:paragraphinfo state="E"/></help:to-be-embedded>
  21.   <p class="Paragraph"><help:paragraphinfo state="U" number="3" xmlns:help="http://openoffice.org/2000/help"/>This object is automatically converted to an Any of the corresponding type when passed to Uno. The type must be specified by its fully qualified Uno type name.</p>
  22.   <table><tr class=""><th style="text-align:left;"><span class="Tabelle3A">
  23.       <p class="Paragraph"><draw:image draw:name="Icon0" svg:desc="This icon marks text containing additional information." svg:pixelx="32" svg:pixely="32" svg:width="0.847cm" svg:height="0.847cm" xlink:href="65980" draw:filter-name="" xmlns:draw="http://openoffice.org/2000/drawing" xmlns:svg="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"/></p>
  24.  
  25.      </span></th><th style="text-align:left;"><span class="Tabelle3B">
  26.       <p class="TableHead"><help:paragraphinfo state="U" number="4" xmlns:help="http://openoffice.org/2000/help"/><help:key-word value="Any type" tag="kw68684_2" xmlns:help="http://openoffice.org/2000/help"/>The <help:productname xmlns:help="http://openoffice.org/2000/help">%PRODUCTNAME</help:productname> API frequently uses the Any type. It is the counterpart of the Variant type known from other environments. The Any type holds one arbitrary Uno type and is used in generic Uno interfaces.</p>
  27.      </span></th></tr></table>
  28.   <p class="Head2"><help:paragraphinfo state="U" number="5" xmlns:help="http://openoffice.org/2000/help"/>Syntax:</p>
  29.   <p class="Paragraph"><help:paragraphinfo state="U" number="6" xmlns:help="http://openoffice.org/2000/help"/>oUnoValue = CreateUnoValue( "[]byte", MyBasicValue ) to get a byte sequence.</p>
  30.   <p class="Paragraph"><help:paragraphinfo state="U" number="7" xmlns:help="http://openoffice.org/2000/help"/>If CreateUnoValue cannot be converted to the specified Uno type, and error occurs. For the conversion, the TypeConverter service is used.</p>
  31.   <p class="Paragraph"><help:paragraphinfo state="U" number="8" xmlns:help="http://openoffice.org/2000/help"/>This function is intended for use in situations where the default Basic to Uno type converting mechanism is insufficient. This can happen when you try to access generic Any based interfaces, such as XPropertySet::setPropertyValue( Name, Value ) or X???Container::insertBy???( ???, Value ), from <help:productname xmlns:help="http://openoffice.org/2000/help">%PRODUCTNAME</help:productname> Basic. The Basic runtime does not recognize these types as they are only defined in the corresponding service.</p>
  32.   <p class="Paragraph"><help:paragraphinfo state="U" number="9" xmlns:help="http://openoffice.org/2000/help"/>In this type of situation, <help:productname xmlns:help="http://openoffice.org/2000/help">%PRODUCTNAME</help:productname> Basic chooses the best matching type for the Basic type that you want to convert. However, if the wrong type is selected, an error occurs. You there use the CreateUnoValue() function to create a value for the unknown Uno type.</p>
  33.   <p class="Paragraph"><help:paragraphinfo state="U" number="10" xmlns:help="http://openoffice.org/2000/help"/>You can also use this function to pass non-Any values, but this is not recommend. If Basic already knows the target type, using the CreateUnoValue() function will only lead to additional converting operations that slow down the Basic execution.</p>
  34.  </body></html>